package net.dntuan.simple.web.listener;

import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;

import org.apache.log4j.Logger;

/**
 * @author tuan.dang
 *
 * <br>$LastChangedRevision: 37 $
 * <br>$LastChangedDate: 2014-04-07 16:55:59 +0000 (Mon, 07 Apr 2014) $
 */
public class MySessionListener implements HttpSessionListener {

	private static final Logger LOGGER = Logger.getLogger(MySessionListener.class);

	public MySessionListener() {
		LOGGER.info("initialize");
	}

	@Override
	public void sessionCreated(HttpSessionEvent se) {
		LOGGER.info("create a session with id: " + se.getSession().getId());
	}

	@Override
	public void sessionDestroyed(HttpSessionEvent se) {
		LOGGER.info("destroy session: " + se.getSession().getId());
	}

}
